<!DOCTYPE html>
<% layout('/layouts/default.html',{title:'列表', libs: ['dataGrid']}){%>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=yes">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/ajz/css/iconfont.css">
    <link type="text/css" rel="stylesheet" href="${ctxStatic}/ajz/css/sf.css"/>
    <script type="text/javascript" src="${ctxStatic}/ajz/js/jquery.min.js"></script>

    <style>

        input::-webkit-input-placeholder {
            color: #fdfdfd;
            font-size: 14px;
            text-align: left;
        }

        .querytext {
            margin-left: 3%;
            width: 55%;
        }

        #tttt {
            float: left;
            display: inline-block;
            width: 25%;
            margin: 10px 1.5%;
            height: 30px;
            float: left;
            line-height: 30px;
            font-size: 14px;
            background: #118eea;
            color: #FFF;
            text-align: center;
            padding-left: 2%;
            border: 1px solid #fff;
            border-radius: 3px;
            -o-border-radius: 3px;
            -ms-border-radius: 3px;
            -moz-border-radius: 3px;
            -webkit-border-radius: 3px;
        }

        .table_btn_upub {
            color: #eee;
            margin: 12px auto 4px auto;
            width: 50px;
            display: inline-block;
            text-align: center;
            font-size: 12px;
            height: 22px;
            line-height: 22px;
            display: inline-block;
            border-bottom: 1px solid #116dc7;
            background: -webkit-linear-gradient(left, #118eea, #1163ea);
            border: 0px;
            border-radius: 4px;
            font-family: "黑体";
            box-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
            -webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
            -moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
            -ms-box-shadow: 1px 1px 1px rgba(0, 0, 0, .5);
        }

        #pagesbox {
            position: fixed;
            bottom: 0px;
            left: 0px;
            box-shadow: -1px -1px 1px rgba(0, 0, 0, .23);
            -ms-box-shadow: -1px -1px 1px rgba(0, 0, 0, .24);
            -o-box-shadow: -1px -1px 1px rgba(0, 0, 0, .24);
            -webkit-box-shadow: -1px -1px 1px rgba(0, 0, 0, .24);
            -moz-box-shadow: -1px -1px 1px rgba(0, 0, 0, .24);
        }

        a {
            color: #000;
            text-decoration: none;
        }
        .wrapper{
            display: none;
        }
    </style>
</head>
<body>
<div class="e_querytopbar">

    <form action="ajzList" name="queryRecordBy" method="post" id="queryRecordBy">
        <input type="hidden" name="officeId" value="${officeId}">
        <input type="hidden" name="userId" value="${userId}">
        <input type="hidden" name="ajzType" value="${ajzType}">
        <div class="e_querytopbar">

            <input name="hwzp" type="text" value="${hwzp}" class="querytext" id="querytext" placeholder="搜索关键字查询">
            <a onclick="submitForm()" id="e_query_btn1" class="iconfont icon-sousuo e_query_btn1"></a>
        </div>
    </form>
    <form action="ajzList" name="zhauntai" method="get" id="ttt">
        <input type="hidden" name="officeId" value="${officeId}">
        <input type="hidden" name="userId" value="${userId}">
        <input type="hidden" name="ajzType" value="${ajzType}">
        <div>

        </div>
    </form>
</div>

</div>

<form action="listData1" name="queryRecordBy" method="post" id="queryRecordBy">
    <input type="hidden" name="officeId" value="${officeId}">
    <input type="hidden" name="userId" value="${userId}">
    <input type="hidden" name="ajzType" value="${ajzType}">
    <div class="e_querytopbar">

        <input name="hwzp" type="text" value="${hwzp}" class="querytext" id="queryRecordBy" placeholder="搜索关键字查询">
        <a onclick="submitForm()" id="e_query_btn1" class="iconfont icon-sousuo e_query_btn1"></a>
    </div>
</form>
<div class="nubbox" id="cs">
    &nbsp;&nbsp;
    总计:${page.list.~size}家
</div>
<%
for(ajzCompanyInfo in page.list){
%>
<div class="e_querycontent">
    <div class="e_q_c_left">
        <ul>
            <h5><img src="${ctxStatic}/ajz/img/xinxi.png"><b>单位信息</b><span class="color_title1">(已检查，未复查)</span></h5>
            <li><i>单位名称</i><b>${ajzCompanyInfo.enterpriseName}</b></li>
            <li><i>联系人</i><b><a href="equery_1" class="sa_line">${ajzCompanyInfo.contactPerson}</a></b></li>
            <li><i>联系电话</i><b>${ajzCompanyInfo.contactPersonTel}</b></li>
            <li>
                <i>所在地址</i>
                <b>
                    ${ajzCompanyInfo.addr}
                </b>
            </li>
        </ul>
    </div>
    <div class="hi_degbtnbar">
        <a href="form?ajzType=${ajzType}&id=${ajzCompanyInfo.id}&officeId=${officeId}&userId=${userId}" class="xgbtn_1">修改信息</a>
        <a href="record?ajzType=${ajzType}&id=${ajzCompanyInfo.id}&officeId=${officeId}&userId=${userId}" class="xcbtn_1">现场检查</a>
    </div>
</div>
<% } %>



<div  class="hi_degbtnbar_iup bgcolor "></div>
<form action="ajzList" name="fenye" method="get" id="fenye">
    <input type="hidden" name="officeId" value="${officeId}">
    <input type="hidden" name="userId" value="${userId}">
    <input type="hidden" name="ajzType" value="${ajzType}">
    <input type="hidden" name="pageno" value="${pageno}">
    <input type="hidden" name="status" value="${status}">

    <div class="hi_degbtnbar_iup bgcolor " id="pagesbox">
        <input type="button" value="上一页" class="table_btn_upub" onclick="up()">
        <span id="inp_up">${pageno}</span>/<span id="inp_down">${pages}</span>
        <input type="button" value="下一页" onclick="down()" class="table_btn_upub">
    </div>



</form>
</body>
<script>
    function submitForm() {

        //获取form表单对象
        var form = document.getElementById("queryRecordBy");
        form.submit();//form表单提交
    }

</script>
<script>

    function submitForm1() {

//获取form表单对象
        var form2 = document.getElementById("ttt");
        form2.submit();//form表单提交


    }
</script>
<script>
    function up() {
        var up = $("#inp_up").html()
        if (up == 1) {

        } else {
            up = up - 1;
        }
        $("input[name ='pageno']").val(up)
        var form1 = document.getElementById("fenye");
        form1.submit();//form表单提交

    }

    function down() {
        var down = $("#inp_up").html()
        var pages =
        ${pages}
        if (down == pages) {

        } else {
            down++;
        }

        $("input[name ='pageno']").val(down)

        var form3 = document.getElementById("fenye");
        form3.submit();//form表单提交
    }
</script>
<script>
    function getMapAddress(obj){
        var addr = $(obj).text();
        $.ajax({
            url: 'https://apis.map.qq.com/ws/geocoder/v1/?address='+addr+'&key=R73BZ-7JVK6-QSQSI-MZIPQ-E5BHJ-CTBKT&output=jsonp',
            type: "GET",
            dataType: "jsonp",
            jsonp:'callback',
            success: function (data) {
                var msg = data.message;
                // alert(msg)
                if ("query ok"==msg) {
                    var posi=data.result.location;
                    var lat = posi.lat;
                    var lng = posi.lng;
                    var href = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:'+lat+','+lng;
                    window.location.assign(href)
                }else{
                    alert("地址有误，请填写正确的地址");
                }
            }
        });
    }
</script>
</html>
<% } %>